﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteRequireLogin.Master" AutoEventWireup="true" CodeBehind="HistoryTrans.aspx.cs" Inherits="TranTekBE.NhaThuoc.HistoryTrans" %>

<%@ Register Src="~/NhaThuoc/MenuNhaThuoc.ascx" TagPrefix="uc1" TagName="MenuNhaThuoc" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
      <link href="../../Maintenance/css/bootstrap.css" rel="stylesheet" />
    <link href="../../Maintenance/css/custom.css" rel="stylesheet" />
    <link href="../../Maintenance/css/whmcs.css" rel="stylesheet" />
    <script src="../../Maintenance/js/whmcs.js"></script>
      <style type="text/css">
          .auto-style1 {
              color: Red; /*font-size:10px;*/ /*font-style:italic;*/;
              font-size: 12px;
              height: 24px;
          }
      </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel" runat="server"  >
        <ContentTemplate>

            <div style="position: absolute;margin-top: 50px; margin-bottom:50px">
                <uc1:MenuNhaThuoc runat="server" ID="MenuNhaThuoc" />    
                 <h1 style="">Xem Giao Dịch Của Thẻ Extracase</h1>

                <table width="70%" cellpadding="4" cellspacing="4"> 
                    <tr>
                      <td colspan="5" class="auto-style1"><asp:Literal ID="ltError" runat="server" />&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="right">Số điện thoại :</td>
                        <td><asp:TextBox runat="server" ID="txtPhone"></asp:TextBox></td>
                        <td align="right">Mã Khách hàng :</td>
                        <td><asp:TextBox runat="server" ID="txtIDExtra"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right">Tên Khách hàng:</td>
                        <td>
                            <asp:Label runat="server" ID="lbName" Font-Bold="true"></asp:Label>
                        </td>
                        <td align="right">Điểm tích lũy: </td>
                        <td>
                            <asp:Label runat="server" ID="lbExtracare" Font-Bold="true"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Số thẻ:</td>
                        <td>
                            <asp:Label runat="server" ID="lbSoThe"></asp:Label>
                        </td>
                        <td align="right">Số điện thoại: </td>
                        <td>
                            <asp:Label runat="server" ID="lbSoDT"></asp:Label>
                        </td>
                    </tr>
                </table>
                <br />
                <table>
                
                   <tr>
                    <td class="tdLeftM">
                        <asp:Button ID="btnSort" runat="server" Text="Sắp xếp" Width="70px" CommandName="Sort" oncommand="ControlClick_Command"  />
                        <asp:DropDownList ID="ddlSortBy" runat="server">
                            <asp:ListItem Text="Số Bill" Value="trans.C002800"  />
                            <asp:ListItem Text="Cửa Hàng" Value="trans.C002800" />
                            <asp:ListItem Text="Ngày Bán" Value="trans.UC00001" Selected="True" />
                           
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlSortDirect" runat="server">
                            <asp:ListItem Text="Tăng dần" Value="ASC"  />
                            <asp:ListItem Text="Giảm dần" Value="DESC" Selected="True" />
                        </asp:DropDownList>
                        <asp:PlaceHolder ID="phPageNavigation" runat="server">
                            <asp:Button ID="btnGoPage" runat="server" Text="Đi đến trang" CommandName="GoToPage" oncommand="ControlClick_Command" />
                            <asp:TextBox ID="txtGoPage" runat="server" Width="30px" MaxLength="3" />
                            <asp:Button ID="btnPrev" runat="server" CommandName="GoToPrev" Text="<<" oncommand="ControlClick_Command" />
                            <asp:Literal ID="ltPage" runat="server" />
                            <asp:Button ID="btnNext" runat="server" CommandName="GoToNext" Text=">>" oncommand="ControlClick_Command" />
                        </asp:PlaceHolder>
                        Số dòng / trang: <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true" onselectedindexchanged="ddlPageSize_SelectedIndexChanged" />
                    </td>
                </tr>
                
                <tr>
                    <td class="tdLeftT">
                        <table style="width:100%" class="tblGrid">
                            <tr>
                                <th class="thGrid" style="width:5%;">No. </th>
                                <th class="thGrid" style="width:30%;"><asp:LinkButton ID="lbSoBill" runat="server" Text="Số Bill" CommandArgument="DESC" CommandName="trans.C002800" onclick="Sort_Click" CssClass="GridHeader" /></th>
                                <th class="thGrid" style="width:10%;"><asp:LinkButton ID="lbCuaHang" runat="server" Text="Cửa Hàng" CommandArgument="DESC" CommandName="trans.C002800" onclick="Sort_Click" CssClass="GridHeader" /></th>
                                <th class="thGrid" style="width:5%;"><asp:LinkButton ID="lbNgayGD" runat="server" Text="Ngày Giao Dịch" CommandArgument="DESC" CommandName="trans.UC00001" onclick="Sort_Click" CssClass="GridHeader sortDesc" /></th>
                                
                            </tr>
                            <tr>
                                <td class="tdGrid tdCenterM">
                                    <table class="centerObject">
                                        <tr>
                                            <td><asp:ImageButton ID="btnClearSearch" runat="server" ImageUrl="/images/ico_clear_search.gif" 
                                        ToolTip="Clear Search" onclick="btnClearSearch_Click" Height="10px" /></td>
                                            <td><asp:ImageButton ID="btnSearch" runat="server" ImageUrl="/images/ico_search.gif" ToolTip="Search" 
                                        onclick="btnSearch_Click" /></td>
                                        </tr>
                                    </table>
                                </td>
                                <td class="tdGrid tdCenterM"><asp:TextBox ID="txtMaBill" runat="server" Width="98%" /></td>
                                <td class="tdGrid tdCenterM"><asp:TextBox ID="txtCuaHang" runat="server" Width="90%" /></td>
                                <td class="tdGrid tdCenterM">
                                    <table>
                                        <tr>
                                            <td align="right">Fr:</td>
                                            <td><asp:TextBox runat="server" ID="txtfr" Width="110px"></asp:TextBox></td>
                                        </tr>
                                        <tr>
                                            <td>To:</td>
                                            <td><asp:TextBox runat="server" ID="txtto" Width="110px"></asp:TextBox></td>
                                        </tr>
                                    </table>
                                </td>
                                
                            </tr>
                            <asp:Repeater ID="rpCategory" runat="server">
                                <ItemTemplate>
                                     <tr style='<%# ThuVien.FunctionsUtils.CSS_RowInTable(Container.ItemIndex,"#FFFFE0","#D7E3F2") %>'>
                                        <td class="tdGrid tdCenterM"><%# Container.ItemIndex + 1 %> </td>
                                        
                                        <td class="tdGrid tdLeftM">
                                            <a href="#" id='details_<%#Eval("MaBill")%>'><%# ThuVien.FunctionsUtils.HTMLEncode(Eval("MaBill"))%></a>
                                        </td>
                                        <td class="tdGrid tdLeftM">
                                            <%# ThuVien.FunctionsUtils.HTMLEncode(Eval("CuaHang"))%>
                                        </td>
                                        <td class="tdGrid tdCenterM"><%# formatDate(Eval("NgayBan"))%></td>
                                       
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                            <asp:Literal ID="ltNoRecord" runat="server" Visible="false">
                                <tr><td colspan="5" class="tdGrid tdCenterM">No Record</td></tr>
                            </asp:Literal>                        
                        </table>
                    </td>
                </tr>
                </table>

             </div>
           

            <script type="text/javascript">
                function LoadJS() {
                    $("#<%=txtfr.ClientID %>").datepicker(
                      {
                          changeMonth: true,
                          changeYear: true,
                          showButtonPanel: true,
                      }
                  );
                    $("#<%=txtto.ClientID %>").datepicker(
                         {
                             changeMonth: true,
                             changeYear: true,
                             showButtonPanel: true,
                         }
                        );

                    //View details
                    $('a[id^="details_"]').on("click", function (e) {
                        e.preventDefault();
                        var id = $(this).attr("id").replace("details_", "");
                        OpenDialog("Chi Tiết Giao Dịch", "HistoryTransDetails.aspx?IDBill=" + id, 550, 800);
                    });
                }
         </script>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
